package aplicacion;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

import javax.swing.SwingUtilities;

import servicio.Conexion;

public class Programa {
	public static void main(String[] args) {
		// INTERFAZ GRAFICA
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				@SuppressWarnings("unused")
				MenuPrincipal principal = new MenuPrincipal();
			}
		});

		// SERVIDOR
		try {
			ServerSocket serverSocket = new ServerSocket(1500);
			while(true) {
				Socket socket = serverSocket.accept();
				Thread coneccion = new Conexion(socket);
				coneccion.start();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
